<?php
function smarty_function_seo($params, &$smarty)
{
	$strController	= isset($params['controller']) ? $params['controller'] : 'index';	
	$strAction		= isset($params['action']) ? $params['action'] : 'index';
	$arrRow			= isset($params['data']) ? $params['data'] : null;
	if(!isset($arrRow)) {
		$objCommon		= new Vfriend_Common();
		$objSeo			= $objCommon->getSeo($strController,$strAction);
		$smarty->assign('strController', $strController);
		$smarty->assign('strAction', $strAction);
		$smarty->assign('objSeo', $objSeo);
	} else {
		$smarty->assign('objSeo', $arrRow);
	}
	$smarty->display(ROOT_DIR . '/library/Vfriend/Plugins/Tpl/seo.tpl');
}
?>
